"""
# -*- coding: utf-8 -*-
# @Time    : 2023/3/8 16:04
# @Author  : 王摇摆
# @FileName: learn_meshgrid.py
# @Software: PyCharm
# @Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
"""

import matplotlib.pyplot as plt
# 本函数是用来将坐标绘画为格点矩阵
import numpy as np

# matplotlib inline
m, n = (5, 3)
x = np.linspace(0, 1, num=m)  # 在0和1之间创建m份，构成等差数列
y = np.linspace(0, 1, n)
X, Y = np.meshgrid(x, y)
print('x:', x)
print('Y:', y)
print('X:', X)
print('Y:', Y)

print(X.shape)
print(Y.shape)

plt.plot(X, Y, marker='1', color='red', linestyle='')
plt.show()
